package org.ykhl.mq.commons;

import java.nio.charset.Charset;
import java.nio.charset.StandardCharsets;

/**
 * Created by zkf on 2015/12/10.
 */
public class Constants {
    private Constants() {}
    public enum Role{HOSPITAL, APPSERVER};

    public static final Charset CHARSET = StandardCharsets.UTF_8;

    public static final String MQ_DISPATCHER_PRODUCER = "mq-dispatcher-producer";
    public static final String MQ_DISPATCHER_CONSUMER = "mq-dispatcher-consumer";
    
    public static final String MQ_LOG_TOPIC = "mq-log-topic";
    public static final String MQ_FROM_APPSERVER_TOPIC_PREFIX = "mq-from-appserver-topic-";
    public static final String MQ_TO_APPSERVER_TOPIC_PREFIX = "mq-to-appserver-topic-";

    public static final String MQ_FROM_APPSERVER_PRODUCER_PREFIX = "mq-from-appserver-producer-";
    public static final String MQ_TO_APPSERVER_CONSUMER_PREFIX = "mq-to-appserver-consumer-";
    public static final String MQ_LOG_CONSUMER = "mq-log-consumer";
    public static final String MQ_BACKUP_HOSPITAL_CONSUMER = "mq-backup-hospital-consumer";
    public static final String MQ_BACKUP_APPSERVER_CONSUMER = "mq-backup-appserver-consumer";
//    //restful的队列
//    public static final String MQ_FROM_RESTFUL_TOPIC_PREFIX = "mq-from-restful-topic-";
//    public static final String MQ_TO_RESTFUL_TOPIC_PREFIX = "mq-to-restful-topic-";
//    //规则转换的队列
//    public static final String MQ_FROM_TRANSFORM_TOPIC_PREFIX = "mq-from-transform-topic-";
//    public static final String MQ_TO_TRANSFORM_TOPIC_PREFIX = "mq-to-transform-topic-";


    public static final String KAFKA_BATCH_SIZE_IN_BYTES = "400";

    public static final String KAFKA_SERVER_LIST_DEV = "kafka-01:19022,kafka-02:19023,kafka-03:19024";

    public static final String KAFKA_SERVER_LIST_PROD = "cmsci.com.cn:9092";

    public static final String CLASSPATH =
            Constants.class.getClassLoader().getResource("").getPath().toString();

    public static final String KAFKA_SECURITY_TRUSTSTORE_LOCATION = CLASSPATH  + "security-files/client.truststore.jks";
    public static final String KAFKA_SECURITY_KEYSTORE_LOCATION = CLASSPATH + "security-files/client.keystore.jks";


    public static final String KEYSTORE_TYPE = "JKS";
    public static final char[] KEYSTORE_PASSWD = "123456".toCharArray();
    public static final String KEYSTORE_ALIAS_NAME = "localhost";

}
